```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>应用驱动API学习-字符流</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .card {
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        }
        .code-block {
            background-color: #f8f9fa;
            border-left: 4px solid #6e8efb;
        }
        .api-class {
            border-radius: 8px;
            background-color: #f5f7ff;
            border-left: 4px solid #4f46e5;
        }
        .task-item {
            position: relative;
            padding-left: 1.5rem;
        }
        .task-item:before {
            content: "";
            position: absolute;
            left: 0;
            top: 0.6rem;
            width: 0.75rem;
            height: 0.75rem;
            background-color: #4f46e5;
            border-radius: 50%;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-4xl text-center">
            <h1 class="text-4xl md:text-5xl font-bold mb-6">Java 字符流 API 完全指南</h1>
            <p class="text-xl md:text-2xl mb-8 opacity-90">掌握字符流的核心概念与最佳实践，提升你的I/O编程能力</p>
            <div class="flex justify-center space-x-4">
                <a href="#reader-writer" class="px-6 py-3 bg-white text-indigo-600 font-medium rounded-lg hover:bg-opacity-90 transition">核心类</a>
                <a href="#practice" class="px-6 py-3 bg-indigo-700 text-white font-medium rounded-lg hover:bg-indigo-800 transition">实践练习</a>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-4xl px-4 py-12">
        <!-- Reader & Writer Section -->
        <section id="reader-writer" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-2 h-8 bg-indigo-600 mr-4"></div>
                <h2 class="text-3xl font-bold">1. 字符流核心类</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-6 mb-12">
                <!-- Reader Card -->
                <div class="card bg-white rounded-xl p-6 api-class">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-book-reader text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">Reader 抽象类</h3>
                    </div>
                    <div class="code-block p-4 mb-4 rounded">
                        <code class="text-sm">public abstract class Reader extends Object implements Readable, Closeable</code>
                    </div>
                    <p class="text-gray-700">用于读取字符流的抽象类。子类必须实现的方法只有 read(char[], int, int) 和 close()。但是，多数子类将重写此处定义的一些方法，以提供更高的效率和/或其他功能。</p>
                </div>
                
                <!-- Writer Card -->
                <div class="card bg-white rounded-xl p-6 api-class">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-pen-fancy text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">Writer 抽象类</h3>
                    </div>
                    <div class="code-block p-4 mb-4 rounded">
                        <code class="text-sm">public abstract class Writer extends Object implements Appendable, Closeable, Flushable</code>
                    </div>
                    <p class="text-gray-700">写入字符流的抽象类。子类必须实现的方法仅有 write(char[], int, int)、flush() 和 close()。但是，多数子类将重写此处定义的一些方法，以提供更高的效率和/或其他功能。</p>
                </div>
            </div>
            
            <!-- InputStreamReader & OutputStreamWriter -->
            <div class="grid md:grid-cols-2 gap-6 mb-12">
                <!-- InputStreamReader Card -->
                <div class="card bg-white rounded-xl p-6">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-exchange-alt text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">InputStreamReader</h3>
                    </div>
                    <div class="code-block p-4 mb-4 rounded">
                        <code class="text-sm">public class InputStreamReader extends Reader</code>
                    </div>
                    <p class="text-gray-700 mb-4">InputStreamReader 是字节流通向字符流的桥梁：它使用指定的 charset 读取字节并将其解码为字符。它使用的字符集可以由名称指定或显式给定，或者可以接受平台默认的字符集。</p>
                    <div class="bg-gray-100 p-4 rounded-lg">
                        <img src="https://cdn.nlark.com/yuque/0/2023/png/21449790/1692781541734-c25c255a-2a73-41e1-84b1-43aedd22936a.png" alt="InputStreamReader流程图" class="w-full rounded">
                    </div>
                </div>
                
                <!-- OutputStreamWriter Card -->
                <div class="card bg-white rounded-xl p-6">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-exchange-alt text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">OutputStreamWriter</h3>
                    </div>
                    <div class="code-block p-4 mb-4 rounded">
                        <code class="text-sm">public class OutputStreamWriter extends Writer</code>
                    </div>
                    <p class="text-gray-700">OutputStreamWriter 是字符流通向字节流的桥梁：可使用指定的 charset 将要写入流中的字符编码成字节。它使用的字符集可以由名称指定或显式给定，否则将接受平台默认的字符集。</p>
                </div>
            </div>
            
            <!-- Practice Section -->
            <div id="practice" class="mb-12">
                <h3 class="text-2xl font-bold mb-6 text-indigo-700">1.1 采用 OutputStreamWriter 写内容到文件中</h3>
                <div class="bg-white rounded-xl p-6 mb-6">
                    <div class="task-item mb-3">
                        <p>实现写入功能</p>
                    </div>
                    <div class="task-item">
                        <p>实现对文件内容的追加</p>
                    </div>
                </div>
                
                <h3 class="text-2xl font-bold mb-6 text-indigo-700">1.2 采用 InputStreamReader 读取文件的内容</h3>
                <div class="bg-white rounded-xl p-6 mb-6">
                    <div class="task-item mb-3">
                        <p>一个字符数组的读取</p>
                    </div>
                    <div class="task-item">
                        <p>如果文件不存在，会出现什么情况</p>
                    </div>
                </div>
                
                <h3 class="text-2xl font-bold mb-6 text-indigo-700">1.3 完成文本文件的拷贝</h3>
            </div>
        </section>
        
        <!-- Simplified Classes Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-2 h-8 bg-indigo-600 mr-4"></div>
                <h2 class="text-3xl font-bold">2. 简化类：FileReader 和 FileWriter</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-6 mb-8">
                <!-- FileWriter Card -->
                <div class="card bg-white rounded-xl p-6">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-file-export text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">FileWriter</h3>
                    </div>
                    <div class="code-block p-4 mb-4 rounded">
                        <code class="text-sm">public class FileWriter extends OutputStreamWriter</code>
                    </div>
                    <p class="text-gray-700">用来写入字符文件的便捷类。此类的构造方法假定默认字符编码和默认字节缓冲区大小都是可接受的。要自己指定这些值，可以先在 FileOutputStream 上构造一个 OutputStreamWriter。</p>
                </div>
                
                <!-- FileReader Card -->
                <div class="card bg-white rounded-xl p-6">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-file-import text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">FileReader</h3>
                    </div>
                    <div class="code-block p-4 mb-4 rounded">
                        <code class="text-sm">public class FileReader extends InputStreamReader</code>
                    </div>
                    <p class="text-gray-700">用来读取字符文件的便捷类。此类的构造方法假定默认字符编码和默认字节缓冲区大小都是适当的。要自己指定这些值，可以先在 FileInputStream 上构造一个 InputStreamReader。</p>
                </div>
            </div>
            
            <div class="bg-white rounded-xl p-6 mb-12">
                <h3 class="text-2xl font-bold mb-6 text-indigo-700">2.1 实践练习</h3>
                <div class="task-item mb-3">
                    <p>前提：采用 FileReader 和 FileWriter</p>
                </div>
                <div class="task-item mb-3">
                    <p>实现对文件的读功能</p>
                </div>
                <div class="task-item mb-3">
                    <p>实现对文件的写功能</p>
                </div>
                <div class="task-item">
                    <p>实现拷贝功能</p>
                </div>
            </div>
        </section>
        
        <!-- Buffered Classes Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-2 h-8 bg-indigo-600 mr-4"></div>
                <h2 class="text-3xl font-bold">3. 带缓冲区的字符流</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-6 mb-8">
                <!-- BufferedReader Card -->
                <div class="card bg-white rounded-xl p-6">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-tachometer-alt text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">BufferedReader</h3>
                    </div>
                    <div class="code-block p-4 mb-4 rounded">
                        <code class="text-sm">public class BufferedReader extends Reader</code>
                    </div>
                    <p class="text-gray-700">从字符输入流中读取文本，缓冲各个字符，从而实现字符、数组和行的高效读取。可以指定缓冲区的大小，或者可使用默认的大小。大多数情况下，默认值就足够大了。</p>
                </div>
                
                <!-- BufferedWriter Card -->
                <div class="card bg-white rounded-xl p-6">
                    <div class="flex items-center mb-4">
                        <i class="fas fa-tachometer-alt text-indigo-600 text-2xl mr-3"></i>
                        <h3 class="text-xl font-bold">BufferedWriter</h3>
                    </div>
                    <div class="code-block p-4 mb-4 rounded">
                        <code class="text-sm">public class BufferedWriter extends Writer</code>
                    </div>
                    <p class="text-gray-700">将文本写入字符输出流，缓冲各个字符，从而提供单个字符、数组和字符串的高效写入。可以指定缓冲区的大小，或者接受默认的大小。在大多数情况下，默认值就足够大了。</p>
                </div>
            </div>
            
            <div class="bg-white rounded-xl p-6 mb-12">
                <h3 class="text-2xl font-bold mb-6 text-indigo-700">3.1 实践练习</h3>
                <div class="task-item mb-3">
                    <p>前提：采用 BufferedReader 和 BufferedWriter</p>
                </div>
                <div class="task-item mb-3">
                    <p>实现对文件的读功能</p>
                </div>
                <div class="task-item mb-3">
                    <p>实现对文件的写功能</p>
                </div>
                <div class="task-item">
                    <p>实现拷贝功能</p>
                </div>
            </div>
        </section>
        
        <!-- Homework Section -->
        <section>
            <div class="flex items-center mb-8">
                <div class="w-2 h-8 bg-indigo-600 mr-4"></div>
                <h2 class="text-3xl font-bold">4. 作业</h2>
            </div>
            
            <div class="bg-white rounded-xl p-6">
                <div class="task-item mb-6">
                    <p>在c盘下有篇txt文本，读取这个文本并统计出这个文本中指定字符的个数(如指定字符为"我")，将该字符与对应的次数输出到当前项目的key.txt中，例如:输出格式为:我=10</p>
                </div>
                <div class="task-item">
                    <p>在c盘下有一个txt文件，里面的文本内容包含"tmd","TMD","SB"等关键词，要求把读取出来的文本数据中"TMD"、"SB"的敏感字符以"**"或"***"代替，然后再输出到D盘的change.txt文本中</p>
                </div>
            </div>
        </section>
        
        <!-- Mermaid Diagram -->
        <div class="mt-16 bg-white rounded-xl p-6">
            <h3 class="text-2xl font-bold mb-6 text-indigo-700">字符流类关系图</h3>
            <div class="mermaid">
                classDiagram
                    class Object
                    class Reader {
                        <<abstract>>
                        +read(char[], int, int) int
                        +close() void
                    }
                    class Writer {
                        <<abstract>>
                        +write(char[], int, int) void
                        +flush() void
                        +close() void
                    }
                    class InputStreamReader {
                        +InputStreamReader(InputStream)
                        +InputStreamReader(InputStream, Charset)
                    }
                    class OutputStreamWriter {
                        +OutputStreamWriter(OutputStream)
                        +OutputStreamWriter(OutputStream, Charset)
                    }
                    class FileReader {
                        +FileReader(File)
                        +FileReader(String)
                    }
                    class FileWriter {
                        +FileWriter(File)
                        +FileWriter(String)
                    }
                    class BufferedReader {
                        +BufferedReader(Reader)
                        +readLine() String
                    }
                    class BufferedWriter {
                        +BufferedWriter(Writer)
                        +newLine() void
                    }
                    
                    Object <|-- Reader
                    Object <|-- Writer
                    Reader <|-- InputStreamReader
                    InputStreamReader <|-- FileReader
                    Reader <|-- BufferedReader
                    Writer <|-- OutputStreamWriter
                    OutputStreamWriter <|-- FileWriter
                    Writer <|-- BufferedWriter
            </div>
        </div>
    </main>
    
    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-8">
        <div class="container mx-auto max-w-4xl px-4 text-center">
            <div class="mb-4">
                <h3 class="text-xl font-medium text-white mb-2">技术小馆</h3>
                <a href="http://www.yuque.com/jtostring" class="text-indigo-400 hover:text-indigo-300 transition">www.yuque.com/jtostring</a>
            </div>
            <div class="text-sm">
                &copy; 2023 技术小馆. All rights reserved.
            </div>
        </div>
    </footer>
    
    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```